/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Marta
 */
@Entity
@Table(name = "cliente")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Cliente.findAll", query = "SELECT c FROM Cliente c"),
    @NamedQuery(name = "Cliente.findById", query = "SELECT c FROM Cliente c WHERE c.id = :id"),
    @NamedQuery(name = "Cliente.findByEnderecoLogradouro", query = "SELECT c FROM Cliente c WHERE c.enderecoLogradouro = :enderecoLogradouro"),
    @NamedQuery(name = "Cliente.findByEnderecoNumero", query = "SELECT c FROM Cliente c WHERE c.enderecoNumero = :enderecoNumero"),
    @NamedQuery(name = "Cliente.findByEnderecoComplemento", query = "SELECT c FROM Cliente c WHERE c.enderecoComplemento = :enderecoComplemento"),
    @NamedQuery(name = "Cliente.findByEnderecoBairro", query = "SELECT c FROM Cliente c WHERE c.enderecoBairro = :enderecoBairro"),
    @NamedQuery(name = "Cliente.findByEnderecoCep", query = "SELECT c FROM Cliente c WHERE c.enderecoCep = :enderecoCep"),
    @NamedQuery(name = "Cliente.findByEnderecoCidade", query = "SELECT c FROM Cliente c WHERE c.enderecoCidade = :enderecoCidade"),
    @NamedQuery(name = "Cliente.findByEnderecoUf", query = "SELECT c FROM Cliente c WHERE c.enderecoUf = :enderecoUf"),
    @NamedQuery(name = "Cliente.findByTelefoneCelular", query = "SELECT c FROM Cliente c WHERE c.telefoneCelular = :telefoneCelular"),
    @NamedQuery(name = "Cliente.findByTelefoneResidencial", query = "SELECT c FROM Cliente c WHERE c.telefoneResidencial = :telefoneResidencial"),
    @NamedQuery(name = "Cliente.findByTelefoneComercial", query = "SELECT c FROM Cliente c WHERE c.telefoneComercial = :telefoneComercial")})
public class Cliente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id")
    private Integer id;
    @Size(max = 50)
    @Column(name = "endereco_logradouro")
    private String enderecoLogradouro;
    @Column(name = "endereco_numero")
    private Integer enderecoNumero;
    @Size(max = 15)
    @Column(name = "endereco_complemento")
    private String enderecoComplemento;
    @Size(max = 30)
    @Column(name = "endereco_bairro")
    private String enderecoBairro;
    @Column(name = "endereco_cep")
    private Integer enderecoCep;
    @Size(max = 30)
    @Column(name = "endereco_cidade")
    private String enderecoCidade;
    @Size(max = 2)
    @Column(name = "endereco_uf")
    private String enderecoUf;
    @Size(max = 15)
    @Column(name = "telefone_celular")
    private String telefoneCelular;
    @Size(max = 15)
    @Column(name = "telefone_residencial")
    private String telefoneResidencial;
    @Size(max = 15)
    @Column(name = "telefone_comercial")
    private String telefoneComercial;

    public Cliente() {
    }

    public Cliente(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEnderecoLogradouro() {
        return enderecoLogradouro;
    }

    public void setEnderecoLogradouro(String enderecoLogradouro) {
        this.enderecoLogradouro = enderecoLogradouro;
    }

    public Integer getEnderecoNumero() {
        return enderecoNumero;
    }

    public void setEnderecoNumero(Integer enderecoNumero) {
        this.enderecoNumero = enderecoNumero;
    }

    public String getEnderecoComplemento() {
        return enderecoComplemento;
    }

    public void setEnderecoComplemento(String enderecoComplemento) {
        this.enderecoComplemento = enderecoComplemento;
    }

    public String getEnderecoBairro() {
        return enderecoBairro;
    }

    public void setEnderecoBairro(String enderecoBairro) {
        this.enderecoBairro = enderecoBairro;
    }

    public Integer getEnderecoCep() {
        return enderecoCep;
    }

    public void setEnderecoCep(Integer enderecoCep) {
        this.enderecoCep = enderecoCep;
    }

    public String getEnderecoCidade() {
        return enderecoCidade;
    }

    public void setEnderecoCidade(String enderecoCidade) {
        this.enderecoCidade = enderecoCidade;
    }

    public String getEnderecoUf() {
        return enderecoUf;
    }

    public void setEnderecoUf(String enderecoUf) {
        this.enderecoUf = enderecoUf;
    }

    public String getTelefoneCelular() {
        return telefoneCelular;
    }

    public void setTelefoneCelular(String telefoneCelular) {
        this.telefoneCelular = telefoneCelular;
    }

    public String getTelefoneResidencial() {
        return telefoneResidencial;
    }

    public void setTelefoneResidencial(String telefoneResidencial) {
        this.telefoneResidencial = telefoneResidencial;
    }

    public String getTelefoneComercial() {
        return telefoneComercial;
    }

    public void setTelefoneComercial(String telefoneComercial) {
        this.telefoneComercial = telefoneComercial;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cliente)) {
            return false;
        }
        Cliente other = (Cliente) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entities.Cliente[ id=" + id + " ]";
    }
    
}
